package com.star.star.Activity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.star.star.R;
import com.star.star.adapter.helpAdapter;
import com.star.star.bean.aidBean;
import com.star.star.bean.helpBean;

import java.util.ArrayList;
import java.util.List;

import static android.widget.GridLayout.VERTICAL;


public class helpActivity extends AppCompatActivity implements View.OnClickListener {
    private RecyclerView mRecylerView;
    private TextView tv_main_title,tv_back;
    @SuppressLint("WrongConstant")
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_aid_list);
        mRecylerView = findViewById(R.id.rv_recycleview);
        tv_back =  findViewById(R.id.tv_back);
        tv_main_title =  findViewById(R.id.tv_main_title);
        tv_main_title.setText("日常应援任务");
        tv_back.setOnClickListener(this);
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        layoutManager.setOrientation(VERTICAL);
        mRecylerView.setLayoutManager(layoutManager);
        List<helpBean> daBeans = new ArrayList<>();
        String image = "https://img.ixiumei.com/uploadfile/2019/1206/20191206101927751.jpg";
        daBeans.add(new helpBean( image,"今日小组奖励", "闪耀值+10", "0/1"));
        daBeans.add(new helpBean( image,"在他的小组里发布视频帖子", "闪耀值+30", "1/3"));
        daBeans.add(new helpBean( image,"在他的小组里发布文字帖子", "闪耀值+10", "0/2"));
        daBeans.add(new helpBean( image,"在他的小组里评论帖子", "闪耀值+10", "1/1"));
        daBeans.add(new helpBean( image,"在他的小组分享帖子", "闪耀值+10", "1/4"));
        daBeans.add(new helpBean( image,"在他的小组dianzan帖子", "闪耀值+10", "3/4"));
        helpAdapter adapte = new helpAdapter(this, daBeans);
        mRecylerView.setAdapter(adapte);
        adapte.notifyDataSetChanged();
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tv_back:
              finish();
                break;
        }
    }
}
